{extend name="public/base"/}
{block name="body"}
<div class="main-box no-header clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>用户详情</h2>
		</div>
		<div class="pull-right">
			
		</div>
	</header>
	<!-- 标题栏 -->
	
	<div class="main-box-body clearfix">
		<div class="col-sm-1">
            <img src="{$info.uid|get_avatar}" style="max-width:100%" onerror="this.src='/public/novel/images/default.jpg'">
            <p>{$info.username}</p>
			<p>ID:{$info.uid}</p>
			<p>VIP：{if condition="($info['is_vip'] == 1) and ($info['vip_enddate'] >= time()) "}{$info['vip_enddate']|date='Y-m-d',###}到期{else}未开通{/if}</p>
        </div>
		<div class="col-sm-11">
            <table class="table table-bordered">
				<tr>
					<td>手机号：{$info.mobile}</td>
					<td>充值金额：{$info.allmoney}</td>
					<td>阅读币：{$info.egold}</td>
					<td>充值赠币：{$info.zb}</td>
					<td>签到赠币：{$info.sign_score}</td>
				</tr>
				<tr>
					<td>书币总消耗：{$consumedEgold}</td>
					<td>阅读书籍量：{$readnum}</td>
					<td>充值笔数：{$info.pay}</td>
					<td>渠道商（id）：{$info.agentid}</td>
					<td>微信公众号：{$info.wxmpid||get_wxmp}</td>
				</tr>
				<tr>
					<td>关注状态：{$info.is_attention==1?"已关注":"未关注"}</td>
					<td>关注时间：{$subscribe_at}</td>
					<td>取关时间：{$unsubscribe_at}</td>
					<td>渠道二维码：<img src="{$qrcode}" width="100" height="100" border="0" alt=""></td>
					<td>客服二维码：<img src="{$kefu_qrcode}" width="100" height="100" border="0" alt=""></td>
				</tr>
            </table>
		</div>

		<div class="panel panel-default col-sm-12" id="order-daily-stats-panel">
			<ul class="nav nav-tabs">
				<li >
					<a href="{:url('user/userinfo',array("id"=>$info["uid"]))}">订单记录</a>
				</li>
				<li class="active">
					<a href="{:url('user/userconsuming',array("id"=>$info["uid"]))}">消费记录</a>
				</li>
				<li >
					<a href="{:url('user/userhistory',array("id"=>$info["uid"]))}">阅读记录</a>
				</li>
				<li >
					<a href="{:url('user/userpaylog',array("id"=>$info["uid"]))}">充值记录</a>
				</li>
				
			</ul>
			
			<table class="table table-bordered table-striped" style="margin-top:20px">
				<thead>
					<tr>
						<th>ID</th>						
						<th class="text-center">消费类型</th>
						<th class="text-center">小说名称</th>
						<th class="text-center">章节名称</th>
						<th class="text-center">消费阅读币</th>
						<th class="text-center">消费日期</th>
					</tr>
				</thead>
				<tbody >
					{if condition="empty($subscription)"}
						<tr>
							<td colspan="6" align="center">暂无数据！</td>
						</tr>
						{else/}
						{volist name="subscription" id="item"}
						<tr>
							<td>
								<span >{$item.id}</span>
							</td>
							<td>
								<span >
{switch name="item.buytype" }
    {case value="1"}打赏消费{/case}
    {case value="2"}阅读币消费{/case}
	{case value="3"}赠币消费{/case}
	{case value="4"}全本购买{/case}
	{case value="42"}阅读币全本购买{/case}
	{case value="43"}赠币全本购买{/case}
	{case value="5"}包月消费{/case}
    {default /}
{/switch}</span>
							</td>
							<td>
								<span >{$item.articlename}</span>
							</td>
							<td>
								<span >{$item.chaptername}</span>
							</td>
							<td>
								<span >{$item.price}</span>
							</td>
							<td>
								<span >{$item.create_time|date="Y-m-d H:i:s",###}</span>
							</td>
						</tr>
						{/volist}
					{/if}
				</tbody>
			</table>
		</div>
		{$page}
	</div>
</div>
{/block}